package com.example.game.sdk.framework.plugin

import android.app.Activity
import android.app.Application
import android.content.Context
import android.content.Intent
import android.content.res.Configuration
import android.os.Bundle
import android.view.KeyEvent
import com.example.game.sdk.framework.contract.ActivityLifecycleContract
import com.example.game.sdk.framework.contract.AppLifecycleContract
import com.example.game.sdk.framework.contract.InitializeContract
import org.json.JSONObject

abstract class PluginTemplate : AppLifecycleContract, ActivityLifecycleContract,
    InitializeContract {

    lateinit var activity: Activity

    override fun attachBaseContext(context: Context) {

    }


    override fun onAppCreate(app: Application) {

    }

    override fun init(params: JSONObject) {

    }

    override fun onCreate(activity: Activity, savedInstanceState: Bundle?) {
        this.activity = activity
    }

    override fun onStart(activity: Activity) {

    }

    override fun onResume(activity: Activity) {

    }

    override fun onPause(activity: Activity) {

    }

    override fun onStop(activity: Activity) {

    }

    override fun onDestroy(activity: Activity) {

    }

    override fun onRestart(activity: Activity) {

    }

    override fun onActivityResult(
        activity: Activity,
        requestCode: Int,
        resultCode: Int,
        data: Intent?
    ) {

    }

    override fun onConfigurationChanged(
        activity: Activity,
        newConfig: Configuration
    ) {

    }

    override fun onBackPressed(activity: Activity): Boolean {
        return false
    }

    override fun onKeyDown(
        activity: Activity,
        keyCode: Int,
        event: KeyEvent?
    ): Boolean {
        return false
    }

    override fun onRequestPermissionsResult(
        activity: Activity,
        requestCode: Int,
        permissions: Array<out String?>,
        grantResults: IntArray
    ) {

    }

}